package net.cohoivang.core;

import java.util.LinkedList;
import java.util.List;

public class Sector {
	
	public int sectorId;
	private String sectorName;
	
	private List<Industry> industrys = new LinkedList<Industry>();	
	
	public int getSectorId() {
		return sectorId;
	}

	public void setSectorId(int sectorId) {
		this.sectorId = sectorId;
	}

	public String getSectorName() {
		return sectorName;
	}

	public void setSectorName(String sectorName) {
		this.sectorName = sectorName;
	}

	public List<Industry> getIndustrys() {
		return industrys;
	}

	public void setIndustrys(List<Industry> industrys) {
		this.industrys = industrys;
	}

	public Sector(int sectorId, String sectorName) {
		this.sectorId = sectorId;
		this.sectorName = sectorName;
	}
	
	public Industry createIndustry(int industryId, String industryName) {
		Industry industry = new Industry(industryId, industryName, this);
		industrys.add(industry);
		return industry;
	}
	
}
